<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-else</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="ap">
        <div v-if="Math.random()>0.5">
            大于0.5
        </div>
        <div v-else>
            小于0.5
        </div>
    </div>
</body>
<script>
    new Vue({
        el:'#ap'
    })
</script>
</html>